<template>
	<view class="review-box page-box">
		<view style="height: 148rpx;">
			<u-navbar bgColor="transparent" height="74">
				<view class="u-nav-slot flex-align-center" slot="left">
					<button plain class="back-btn" @click="goBack">返回</button>
				</view>
				<view slot="right">
					<button plain class="back-btn">回到新版</button>
				</view>
			</u-navbar>
		</view>

		<view class="content">
			<view class="content-son">
				<view class="content-son-left">
					<view class="review-content-left-item" v-for="item in tabs" :key="item.value"
						:class="current== item.value ?'active':''" @click="tabChange(item.value)">
						{{item.name}}
						<block v-if="item.isLock">
							<image src="@/static/images/review/lock.png"></image>
						</block>
						<block v-else>
							<view class="flex-align-center">
								<span></span>
								<span></span>
							</view>
						</block>
					</view>
				</view>
				<view class="content-son-right">
					<view class="content-son-right-item1 flex-center">
						<span>单词浏览</span>
						<image src="@/static/images/review/ci.png"></image>
					</view>
					<view class="flex-align-center">
						<view class="content-son-right-item2">
							<view class="content-son-right-item2-top">
								<span>单词跟读</span>
								<image src="@/static/images/review/gendu.png"></image>
							</view>
							<view class="content-son-right-item2-bottom flex-center">
								<span>0/12</span>
							</view>
						</view>
						<image src="@/static/images/review/youjian-duo.png" class="arrow-right"></image>
						<view class="content-son-right-item2">
							<view class="content-son-right-item2-top">
								<span>单词听写</span>
								<image src="@/static/images/review/tingxie-lan.png"></image>
							</view>
							<view class="content-son-right-item2-bottom flex-center">
								<span>未解锁</span>
							</view>
						</view>
					</view>
				</view>

			</view>
		</view>
		<view class="index-right-footer flex-between">
			<span>今日学习效率：0%(00:00/00:00)</span>
			<span>今日词汇记忆 时长:00:00 数量:0个 速度:0个/小时</span>
		</view>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				current: 0,
				tabs: [{
					value: 0,
					name: 'Unit 1 辅音pbtd',
					isLock: false
				}, {
					value: 1,
					name: 'Unit 2 辅音ckgfv',
					isLock: true
				}, {
					value: 2,
					name: 'Unit 3 辅音szmn',
					isLock: true
				}],

			};
		},
		methods: {
			goBack() {
				this.$common.goBack()
			},
			tabChange(val) {
				console.log(val);
				this.current = val;
			}
		}
	}
</script>

<style lang="scss">
	@function px_2_vw($px) {
		@return #{$px * 100 / 1920}vw;
	}

	.page-box {
		background: radial-gradient(97.5% 97.5% at 50% 50.583333333333336%, rgba(34, 45, 245, 1) 0%, rgba(110, 117, 245, 1) 100%);
	}

	.u-nav-slot-center {
		display: flex;
		align-items: center;
		color: #DBD9D9;
		font-size: px_2_vw(48);

		button {
			margin-right: 27rpx;
			height: px_2_vw(40) !important;
			padding: 0 12rpx !important;
		}

	}

	.u-nav-slot-right {}

	.header-tab {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0rpx auto;
		width: 45%;
		margin-bottom: 20rpx;


	}

	.active {
		// background-image: url('../../../../static/images/review/bj-youjian.png');
		// background-size: 100% 100%;
		background: #AFB3F2;
		color: #3900F5 !important;
		// width: calc(100% + 20rpx) !important;
		position: relative;
		span {
			width: px_2_vw(30);
			height: px_2_vw(30);
			border-radius: 50%;
			border: 1px solid #3900F5;
			margin-right: 9rpx;
		}
	}
	
	.active::after {
		content: '';
		right: -40rpx;
		position: absolute;
		margin-left: 20rpx;
		 float: left;
		 width: 0; 
		 height: 0;
		 border-width: 20rpx;
		 border-style: solid;
		 border-color: transparent transparent transparent #AFB3F2;
	}

	.content {
		margin: 0 auto;
		width: 90%;
		padding: 20rpx;
		height: px_2_vw(847);
		background: rgba(113, 120, 248, 1);
		border-radius: 30rpx;

		.content-son {
			height: 100%;
			width: 100%;
			background: rgba(217, 215, 215, 1);
			border-radius: 20rpx;
			display: flex;
			align-items: center;
			padding: 30rpx;

			.content-son-left {
				width: px_2_vw(499);
				height: px_2_vw(775);
				border-radius: 55rpx;
				background: rgba(210, 211, 247, 1);
				border: 1px solid rgba(163, 157, 157, 0.91);
				margin-right: 80rpx;
				padding: 57rpx 0;

				.review-content-left-item {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 100%;
					height: px_2_vw(91);
					text-align: center;
					color: #fff;
					font-size: px_2_vw(36);
					font-weight: 400;
					padding: 0 30rpx;
					image {
						width: px_2_vw(42);
						height: px_2_vw(44);
					}
				}
			}

			.content-son-right {
				display: flex;
				flex-direction: column;
				align-items: center;

				.content-son-right-item1 {
					width: px_2_vw(289);
					height: px_2_vw(226);
					font-weight: 600;
					font-size: px_2_vw(36);
					border-radius: 55rpx;
					background: #fff;
					border: 1rpx solid rgba(192, 193, 252, 1);
					flex-direction: column;

					image {
						width: px_2_vw(94);
						height: px_2_vw(96);
						margin-top: 11rpx;
					}
				}

				.arrow-right {
					width: px_2_vw(70);
					height: px_2_vw(64);
					margin: 0 50rpx;
				}

				.content-son-right-item2 {
					width: px_2_vw(402);
					height: px_2_vw(440);
					margin-top: 28rpx;
					font-weight: 600;
					font-size: px_2_vw(36);

					.content-son-right-item2-top {
						width: 100%;
						height: px_2_vw(261);
						background: rgba(171, 175, 245, 0.91);
						border-radius: 47rpx 47rpx 0 0;
						display: flex;
						flex-direction: column;
						align-items: center;
						justify-content: center;

						image {
							width: px_2_vw(110);
							height: px_2_vw(94);
							margin-top: 23rpx;
						}
					}

					.content-son-right-item2-bottom {
						width: 100%;
						height: px_2_vw(179);
						background: #fff;
						border-radius: 0 0 47rpx 47rpx;
						font-size: px_2_vw(48);
						color: #2B5ECC;

					}
				}
			}


		}
	}

	// 底部
	.index-right-footer {
		color: #fff;
		font-size: 24rpx;
		position: absolute;
		bottom: 37rpx;
		width: 80%;
		left: 10%;
	}
</style>